/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary-color: #3f51b5;
    --secondary-color: #ff4081;
    --dark-color: #263238;
    --gray-color: #757575;
    --light-gray: #f5f5f5;
    --light-color: #f9f9f9;
    --text-color: #333;
    --white-color: #fff;
    --danger-color: #f44336;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --border-radius: 10px;
    --transition: all 0.3s ease;
    
    /* iPhone 15适配变量 */
    --iphone15-width: 390px;
    --iphone15-height: 844px;
    --iphone-safe-area-top: 47px;
    --iphone-safe-area-bottom: 34px;
    --content-max-width: 450px;
}

body {
    background-color: var(--light-color);
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.app-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    background-color: var(--white-color);
    overflow-x: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* 头部导航 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background-color: var(--white-color);
    border-bottom: 1px solid var(--light-gray);
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
}

.logo {
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.search-bar {
    flex: 1;
    margin: 0 15px;
    position: relative;
    border-radius: 20px;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 36px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: none;
    padding: 8px;
    font-size: 14px;
    outline: none;
    color: var(--text-color);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info i {
    font-size: 20px;
    margin-right: 15px;
    color: var(--dark-color);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--light-gray);
    overflow: hidden;
    border: 1px solid var(--light-gray);
}

/* 主内容区 */
.main-content {
    padding: 15px;
    padding-bottom: 80px; /* 为底部导航留出更多空间 */
}

/* 模块通用样式 */
.module {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    overflow: hidden;
}

.module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.module-header h2 {
    font-size: 16px;
    font-weight: bold;
    color: var(--dark-color);
    margin: 0;
}

.module-header .more {
    font-size: 13px;
    color: var(--gray-color);
    display: flex;
    align-items: center;
}

.module-header .more i {
    font-size: 12px;
    margin-left: 2px;
}

.module-header .tabs {
    display: flex;
}

.tab {
    padding: 6px 12px;
    font-size: 14px;
    color: var(--gray-color);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    white-space: nowrap;
}

.tab.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* 滤器标签 */
.filter-tabs {
    display: flex;
    padding: 0 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 10px;
}

.filter-area {
    padding: 10px 15px;
    border-bottom: 1px solid var(--light-gray);
}

.filter-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.filter-label {
    font-size: 14px;
    color: var(--dark-color);
    margin-right: 10px;
    white-space: nowrap;
}

.filter-options {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.filter-option {
    padding: 4px 10px;
    font-size: 13px;
    color: var(--gray-color);
    background-color: var(--light-gray);
    border-radius: 15px;
    margin-right: 8px;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.filter-option.active {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* 卡片容器 */
.card-container {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

/* 卡片基础样式 */
.card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-img {
    position: relative;
    height: 120px;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-img .tag, .card-img .status {
    position: absolute;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 4px;
    font-weight: 500;
}

.card-img .tag {
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--white-color);
}

.card-img .tag.elite {
    background-color: rgba(76, 175, 80, 0.9);
}

.card-img .tag.company {
    background-color: rgba(33, 150, 243, 0.9);
}

.card-img .status {
    bottom: 8px;
    left: 8px;
    font-weight: 500;
}

.card-img .status.ongoing {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.card-img .status.upcoming {
    background-color: var(--warning-color);
    color: var(--white-color);
}

.card-img .status.ended {
    background-color: var(--gray-color);
    color: var(--white-color);
}

.card-body {
    padding: 10px;
}

.card-body h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--dark-color);
    line-height: 1.3;
}

.card-body .info, .card-body .location {
    font-size: 12px;
    color: var(--gray-color);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.card-body .info i, .card-body .location i {
    margin-right: 4px;
    font-size: 12px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.participants {
    font-size: 12px;
    color: var(--gray-color);
    display: flex;
    align-items: center;
}

.participants i {
    margin-right: 4px;
}

.like-btn {
    font-size: 18px;
    color: var(--gray-color);
    background: none;
}

.like-btn:hover, .like-btn.active {
    color: var(--danger-color);
}

/* 活动卡片样式 */
.activity-card .card-body {
    min-height: 120px;
}

/* 机构卡片样式 */
.institution-card .features {
    display: flex;
    flex-wrap: wrap;
    margin: 6px 0;
}

.institution-card .feature {
    font-size: 10px;
    color: var(--primary-color);
    background-color: rgba(63, 81, 181, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.institution-card .employment-rate, .institution-card .employee-count {
    font-size: 12px;
    color: var(--dark-color);
    margin-top: 6px;
    font-weight: 500;
}

/* 岗位卡片样式 */
.job-card {
    display: flex;
    padding: 16px;
    transition: all 0.2s ease;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.job-card .company-logo {
    width: 56px;
    height: 56px;
    margin-right: 14px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    background-color: #f5f5f5;
}

.job-card .company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.job-card:hover .company-logo img {
    transform: scale(1.05);
}

.job-card .card-body {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.job-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--dark-color);
}

.job-card .company-name {
    font-size: 13px;
    color: var(--gray-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.job-card .company-name::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin-right: 6px;
    opacity: 0.7;
}

.job-card .tags {
    display: flex;
    flex-wrap: wrap;
    margin: 8px 0;
}

.job-card .tag {
    font-size: 11px;
    color: var(--primary-color);
    background-color: rgba(63, 81, 181, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
    margin-right: 6px;
    margin-bottom: 6px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.job-card .tag:hover {
    background-color: rgba(63, 81, 181, 0.15);
    transform: translateY(-1px);
}

.job-card .tag:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.job-card .tag:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0) translate(-50%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: scale(30, 30) translate(-50%, -50%);
        opacity: 0;
    }
}

.job-card .card-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--light-gray);
}

.job-card .salary {
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(90deg, #f5515f 0%, #ff8e53 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 12px;
    position: relative;
}

.job-card .location {
    font-size: 12px;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    margin-right: auto;
}

.job-card .location:before {
    content: "\F3E9";
    font-family: "bootstrap-icons";
    margin-right: 4px;
    font-size: 12px;
}

.job-card .apply-btn {
    font-size: 13px;
    font-weight: 500;
    color: var(--white-color);
    background-color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.job-card .apply-btn:hover {
    background-color: #2c3e9e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(63, 81, 181, 0.3);
}

.job-card .apply-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(63, 81, 181, 0.2);
}

.job-card .apply-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.7s;
}

.job-card .apply-btn:hover:before {
    left: 100%;
}

/* 经纪人卡片样式 */
.agent-card .title {
    font-size: 12px;
    color: var(--gray-color);
    margin-bottom: 6px;
}

.agent-card .rating {
    font-size: 12px;
    color: var(--gray-color);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.agent-card .rating i {
    color: #ffc107;
    margin-right: 2px;
}

.agent-card .rating span {
    margin-left: 4px;
}

.agent-card .specialties {
    display: flex;
    flex-wrap: wrap;
    margin: 6px 0;
}

.agent-card .specialty {
    font-size: 10px;
    color: var(--primary-color);
    background-color: rgba(63, 81, 181, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.agent-card .consult-btn {
    width: 100%;
    font-size: 13px;
    color: var(--white-color);
    background-color: var(--primary-color);
    padding: 6px 0;
    border-radius: 20px;
    margin-top: 8px;
    text-align: center;
}

/* 底部导航栏增强样式 */
.tab-bar {
    height: 56px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, bottom 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    width: 95%;
    max-width: var(--content-max-width);
    border-radius: 16px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
    opacity: 0; /* 初始设置为不可见，由JS控制淡入 */
}

.tab-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(74, 111, 238, 0.3), transparent);
    border-radius: 16px 16px 0 0;
}

.tab-bar .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #8e8e93;
    font-size: 12px;
    padding: 6px 0;
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

.tab-bar .tab-item.active {
    color: #4a6fee;
    font-weight: 500;
    transform: scale(1.05);
}

.tab-bar .tab-item i {
    font-size: 22px;
    margin-bottom: 3px;
    transition: all 0.3s ease;
    position: relative;
}

.tab-bar .tab-item span {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.tab-bar .tab-item:not(.active):hover {
    color: #6a85e0;
}

/* 滚动时隐藏底部导航栏 */
.tab-bar-hidden {
    transform: translateX(-50%) translateY(150%);
    opacity: 0;
}

/* 为底部导航栏添加动画效果 */
@keyframes tabItemAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tab-bar .tab-item i {
    animation: tabItemAppear 0.5s backwards;
}

.tab-bar .tab-item:nth-child(1) i { animation-delay: 0.1s; }
.tab-bar .tab-item:nth-child(2) i { animation-delay: 0.2s; }
.tab-bar .tab-item:nth-child(3) i { animation-delay: 0.3s; }
.tab-bar .tab-item:nth-child(4) i { animation-delay: 0.4s; }

/* 为活跃项添加底部指示器 */
.tab-bar .tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #4a6fee;
    box-shadow: 0 0 10px rgba(74, 111, 238, 0.8);
    filter: blur(0.5px);
    animation: pulseIndicator 2s infinite;
}

@keyframes pulseIndicator {
    0% { transform: translateX(-50%) scale(1); opacity: 0.7; }
    50% { transform: translateX(-50%) scale(1.3); opacity: 0.5; }
    100% { transform: translateX(-50%) scale(1); opacity: 0.7; }
}

/* iPhone 15 特定适配 */
@media screen and (width: 390px) and (height: 844px) {
    .app-container {
        padding-top: var(--iphone-safe-area-top);
        padding-bottom: var(--iphone-safe-area-bottom);
    }
    
    .header {
        padding-top: calc(12px + var(--iphone-safe-area-top));
    }
    
    .tab-bar {
        padding-bottom: var(--iphone-safe-area-bottom);
    }
}

/* 通用响应式适配 */
@media (max-width: 768px) {
    .card-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .job-card .company-logo {
        width: 40px;
        height: 40px;
    }
    
    .module-header h2 {
        font-size: 15px;
    }
    
    .card-img {
        height: 100px;
    }
}

@media (max-width: 390px) {
    .card-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .module {
        margin-bottom: 10px;
    }
    
    .filter-tabs .tab {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .module-header {
        padding: 12px;
    }
    
    .user-info i {
        margin-right: 10px;
    }
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #121212;
        --white-color: #1e1e1e;
        --light-gray: #2c2c2c;
        --text-color: #e0e0e0;
        --dark-color: #f5f5f5;
        --gray-color: #b0b0b0;
    }
    
    .search-bar {
        background-color: #2a2a2a;
    }
    
    .card, .module {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .tab-bar {
        background-color: rgba(30, 30, 30, 0.9);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
    .tab-bar .tab-item {
        color: rgba(255, 255, 255, 0.6);
    }
    
    .tab-bar .tab-item.active {
        color: #6a85e0;
    }
    
    .tab-bar .tab-item.active::after {
        background-color: #6a85e0;
        box-shadow: 0 0 10px rgba(106, 133, 224, 0.8);
    }
}

/* Toast通知样式 */
.toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 4px;
    z-index: 1000;
    font-size: 14px;
    max-width: 80%;
    text-align: center;
}

/* 下拉刷新样式 */
.refresh-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transform: translateY(-100%);
}

.loading .app-container {
    opacity: 0.8;
}

/* 热门实习模块样式增强 */
.internships .filter-area {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin: 0 15px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.internships .filter-row {
    margin-bottom: 10px;
}

.internships .filter-row:last-child {
    margin-bottom: 0;
}

.internships .filter-options {
    flex-wrap: wrap;
}

.internships .filter-option {
    margin-bottom: 8px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.internships .filter-option:hover {
    background-color: rgba(63, 81, 181, 0.08);
}

.internships .filter-option.active {
    background-color: rgba(63, 81, 181, 0.12);
}

/* 热门实习容器调整 */
.internships .card-container {
    display: block;
    padding: 0 15px;
}

/* 热门实习模块标题样式 */
.internships .module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin: 0 15px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.internships .module-header h2 {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
}

.internships .module-header h2::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background-color: var(--primary-color);
    border-radius: 2px;
    margin-right: 8px;
}

.internships .module-header .more {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.internships .module-header .more:hover {
    opacity: 0.8;
}

.internships .module-header .more i {
    margin-left: 4px;
    font-size: 12px;
}

/* 热门实习卡片容器响应式布局 */
@media (min-width: 768px) {
    .internships .card-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 15px;
        padding: 0 15px;
    }
    
    .job-card {
        margin-bottom: 0;
    }
}

/* 移动端适配 */
@media (max-width: 480px) {
    .job-card {
        padding: 12px;
    }
    
    .job-card .company-logo {
        width: 48px;
        height: 48px;
        margin-right: 10px;
    }
    
    .job-card h3 {
        font-size: 14px;
    }
    
    .job-card .salary {
        font-size: 13px;
    }
    
    .job-card .apply-btn {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .internships .filter-area {
        padding: 12px;
    }
    
    .internships .filter-option {
        padding: 4px 8px;
        margin-right: 6px;
    }
}

/* 岗位卡片信息区域样式 */
.job-card .job-info {
    flex: 1;
}

/* 为位置显示添加样式 */
.location-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.location-icon {
    color: var(--primary-color);
    font-size: 16px;
    margin-right: 5px;
}

.location-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.location-info:hover .location-text {
    color: var(--primary-color);
}

/* 位置加载动画 */
.location-info.locating .location-icon {
    animation: location-pulse 1.5s infinite;
}

@keyframes location-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* 暗模式支持 */
@media (prefers-color-scheme: dark) {
    .location-text {
        color: #e0e0e0;
    }
}

/* 点击涟漪效果 */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
    z-index: 10;
    width: 100px;
    height: 100px;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 禁用功能的样式 */
.disabled-feature {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.disabled-feature:after {
    content: " (已停用)";
    font-size: 0.8em;
    color: #999;
} 